﻿using System;

namespace __Able.Core.ConfigTable
{
    [Serializable]
    [AttributeUsage(AttributeTargets.Property)]
    public class ConfigTableItem : Attribute
    {
        public ConfigTableItem(string Title)
        {
            this.Title = Title;
            this.UI = CTUI.Region;
        }

        /// <summary>
        /// UI显示的名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// UI的显示形式
        /// </summary>
        public CTUI UI { get; set; }
        /// <summary>
        /// DblCheckTree 模式下的数据源地址
        /// </summary>
        public string Url { get; set; }
    }

    [Serializable]
    public enum CTUI
    {
        /// <summary>
        /// 区域
        /// </summary>
        Region,
        /// <summary>
        /// 输入框
        /// </summary>
        Input,
        /// <summary>
        /// 单选框
        /// </summary>
        Checkbox,
        /// <summary>
        /// 多选树
        /// </summary>
        DblCheckTree
    }
}